<?php /* Smarty version 2.6.16, created on 2013-09-11 14:20:13
         compiled from ../templates/admin/dashboard/dashboard.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'ucfirst', '../templates/admin/dashboard/dashboard.tpl', 151, false),array('modifier', 'date_format', '../templates/admin/dashboard/dashboard.tpl', 153, false),array('modifier', 'base64_encode', '../templates/admin/dashboard/dashboard.tpl', 155, false),array('modifier', 'substr', '../templates/admin/dashboard/dashboard.tpl', 224, false),array('modifier', 'strlen', '../templates/admin/dashboard/dashboard.tpl', 224, false),array('modifier', 'ucwords', '../templates/admin/dashboard/dashboard.tpl', 304, false),array('modifier', 'truncate', '../templates/admin/dashboard/dashboard.tpl', 306, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_start'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
  $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_end'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

 <div class="contain">
 
      <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['left_menu'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
      
      <div class="right_contain">
        <div class="heading_box">Dashboard</div>
         
        <div class="whitebox">
        <?php if ($this->_tpl_vars['msg']): ?>
         <div class="masg_div"><?php echo $this->_tpl_vars['msg']; ?>
</div>
         <?php endif; ?>
          <div class="dashboard_leftcontain">
          <div class="dashboard_quicklinkbox">
            <div class="quicklinks">
             <h2><span>Quick Links</span> Popular shortcuts</h2>
             <ul>
             <!-- CMS DashBoard Start-->
              <li>
                  <?php if ($this->_tpl_vars['mod_per'][1] == '1'): ?>
                  <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=cms">
                    <div class="topic_icon"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/topic_icon1.png" /></div>                    
                    <div class="topic_name">CMS</div>
                  </a>
                  <?php else: ?>
                   <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php">
                    <div class="topic_icon"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/topic_icon1.png" title="No Permission" /></div>                    
                    <div class="topic_name">CMS</div>
                  </a>
                  <?php endif; ?>

              </li>
              <!-- CMS DashBoard End-->
             
               <!-- Manageusers DashBoard Start-->
             <li>
              	 <?php if ($this->_tpl_vars['mod_per'][14] == '1'): ?>
                  <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=homeowneruser">
                    <div class="topic_icon"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/topic_icon3.png" /></div>                    
                    <div class="topic_name">Homeowner</div>
                  </a>
                  <?php else: ?>
                  <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php">
                    <div class="topic_icon"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/topic_icon3.png" title="No Permission"/></div>                    
                    <div class="topic_name">Homeowner</div>
                  </a>
                  <?php endif; ?>

              </li>
              <li>
              	 <?php if ($this->_tpl_vars['mod_per'][19] == '1'): ?>
                  <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=tradesmanuser">
                    <div class="topic_icon"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/topic_icon3.png" /></div>                    
                    <div class="topic_name">Tradesman</div>
                  </a>
                  <?php else: ?>
                  <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php">
                    <div class="topic_icon"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/topic_icon3.png" title="No Permission"/></div>                    
                    <div class="topic_name">Tradesman</div>
                  </a>
                  <?php endif; ?>

              </li>
              <!-- Manageusers DashBoard End-->
             
             <!-- Payment History DashBoard Start-->
             <li>
              	  <?php if ($this->_tpl_vars['mod_per'][25] == '1'): ?>
                  <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=paymenthistory">
                    <div class="topic_icon"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/topic_icon4.png" /></div>                   
                    <div class="topic_name">Report</div>
                  </a>
                  <?php else: ?>
                  <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php">
                    <div class="topic_icon"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/topic_icon4.png"  title="No Permission"/></div>                   
                    <div class="topic_name">Report</div>
                  </a>
                  <?php endif; ?>

             </li>
              <!-- Payment History End-->
              
              <!-- Sitesettings DashBoard Start-->
              <li>
				<?php if ($_SESSION['admin_type'] == '1' && $this->_tpl_vars['mod_per'][6] == '1'): ?>              
                  <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=sitesettings">
                    <div class="topic_icon"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/topic_icon2.png" /></div>                    
                  
                  <div class="topic_name">Settings</div></a>
                  <?php elseif ($this->_tpl_vars['mod_per'][6] == '1'): ?>
                  <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=defaultseo">
                    <div class="topic_icon"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/topic_icon2.png" /></div>                   
                        
                  <div class="topic_name">Settings</div> </a>          
                  <?php else: ?>
                  <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php">
                    <div class="topic_icon"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/topic_icon2.png" title="No Permission"/></div>                    
                  
                  <div class="topic_name">Settings</div></a>
                  <?php endif; ?>
                 
              </li>
              <!-- Sitesettings DashBoard End-->
              
              
                <!-- Payment History DashBoard Start-->
             <li>
              	  <?php if ($this->_tpl_vars['mod_per'][24] == '1'): ?>
                  <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=messages">
                    <div class="topic_icon"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/topic_icon5.png" /></div>   
                    <div class="topic_name">Messages</div>                
                  </a>
                  <?php else: ?>
                  <a href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php">
                    <div class="topic_icon"><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/topic_icon5.png"  title="No Permission"/></div>    
                    <div class="topic_name">Messages</div>               
                  </a>
                  <?php endif; ?>
                   
             </li>
              <!-- Payment History End-->
              
              <div class="clear"></div>
             </ul>
            </div>
          </div>
          </div>
          <div class="dashboard_rightcontain">
           
            <div>
          <ul id="menu1">
           <?php if ($this->_tpl_vars['mod_per'][19] == '1'): ?>
            <li> <a href="#" class="active">Recently Registered Tradesman</a>
              <ul>
              
            <div class="table_view">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_viewbox">
              <tr>
                <th align="center">#</th>
                <th>Username</th>
                <th>Email</th>
                <th>Registerd Date</th>
                <th>Action</th>
              </tr>
              <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['tradesmanArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?> 
              <tr>
                <td align="center"><?php echo $this->_sections['i']['iteration']; ?>
</td>
               <!-- <td><?php echo $this->_tpl_vars['userArray'][$this->_sections['i']['index']]['first_name']; ?>
&nbsp;<?php echo $this->_tpl_vars['userArray'][$this->_sections['i']['index']]['last_name']; ?>
</td>-->
                <td><?php echo ((is_array($_tmp=$this->_tpl_vars['tradesmanArray'][$this->_sections['i']['index']]['username'])) ? $this->_run_mod_handler('ucfirst', true, $_tmp) : smarty_modifier_ucfirst($_tmp)); ?>
</td>
                <td><?php echo $this->_tpl_vars['tradesmanArray'][$this->_sections['i']['index']]['email']; ?>
</td>
                <td><?php echo ((is_array($_tmp=$this->_tpl_vars['tradesmanArray'][$this->_sections['i']['index']]['registered_date'])) ? $this->_run_mod_handler('date_format', true, $_tmp) : smarty_modifier_date_format($_tmp)); ?>
</td>
                <td>
                    <span><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/icon-search.png" onclick="javascript: window.location='<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=detailtradesmanuser&id=<?php echo ((is_array($_tmp=$this->_tpl_vars['tradesmanArray'][$this->_sections['i']['index']]['id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
';" style="cursor:pointer;" /></span>
                </td>
              </tr>
              <?php endfor; else: ?>
               <tr>
               	 <td colspan="5"><div class="error" align="center">Oops, Sorry there are no tradesman user.</div></td>
               </tr>
               <?php endif; ?>
            </table>
            </div>
              </ul>
            </li>
            <?php endif; ?>
               
            <?php if ($this->_tpl_vars['mod_per'][14] == '1'): ?>
            <li> <a href="#" class="active">Recently Registered HomeOwner</a>
              <ul>
              
            <div class="table_view">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_viewbox">
              <tr>
                <th align="center">#</th>
                <th>Username</th>
                <th>Email</th>
                <th>Registerd Date</th>
                <th>Action</th>
              </tr>
              <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['homeownerArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?> 
              <tr>
                <td align="center"><?php echo $this->_sections['i']['iteration']; ?>
</td>
               <!-- <td><?php echo $this->_tpl_vars['userArray'][$this->_sections['i']['index']]['first_name']; ?>
&nbsp;<?php echo $this->_tpl_vars['userArray'][$this->_sections['i']['index']]['last_name']; ?>
</td>-->
                <td><?php echo ((is_array($_tmp=$this->_tpl_vars['homeownerArray'][$this->_sections['i']['index']]['username'])) ? $this->_run_mod_handler('ucfirst', true, $_tmp) : smarty_modifier_ucfirst($_tmp)); ?>
</td>
                <td><?php echo $this->_tpl_vars['homeownerArray'][$this->_sections['i']['index']]['email']; ?>
</td>
                <td><?php echo ((is_array($_tmp=$this->_tpl_vars['homeownerArray'][$this->_sections['i']['index']]['registered_date'])) ? $this->_run_mod_handler('date_format', true, $_tmp) : smarty_modifier_date_format($_tmp)); ?>
</td>
                <td>
                    <span><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/icon-search.png" onclick="javascript: window.location='<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=detailhomeowneruser&id=<?php echo ((is_array($_tmp=$this->_tpl_vars['homeownerArray'][$this->_sections['i']['index']]['id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
';" style="cursor:pointer;" /></span>
                </td>
              </tr>
               <?php endfor; else: ?>
               <tr>
               	 <td colspan="5"><div class="error" align="center">Oops, Sorry there are no homeowner user.</div></td>
               </tr>
               <?php endif; ?>
            </table>
            </div>
              </ul>
            </li>
            <?php endif; ?>
              
          <?php if ($this->_tpl_vars['mod_per'][14] == '1'): ?>
            <li> <a href="#" class="active">Recently Posted Jobs</a>
              <ul>
              
            <div class="table_view">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_viewbox">
              <tr>
                <th align="center">#</th>
                <th width="20%">Trade Category</th>
                <th width="15%">Job Type</th>
                <th width="25%" >Job Description</th>
                <th width="20%">Posted Date</th>
                <th width="20%">Action</th>
              </tr>
              <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['postedjobArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?> 
              <tr>
                <td align="center"><?php echo $this->_sections['i']['iteration']; ?>
</td>
               <!-- <td><?php echo $this->_tpl_vars['userArray'][$this->_sections['i']['index']]['first_name']; ?>
&nbsp;<?php echo $this->_tpl_vars['userArray'][$this->_sections['i']['index']]['last_name']; ?>
</td>-->
                <td><?php echo ((is_array($_tmp=$this->_tpl_vars['postedjobArray'][$this->_sections['i']['index']]['trade_category'])) ? $this->_run_mod_handler('ucfirst', true, $_tmp) : smarty_modifier_ucfirst($_tmp)); ?>
</td>
                <td><?php echo $this->_tpl_vars['postedjobArray'][$this->_sections['i']['index']]['jobtype_name']; ?>
</td>
                <td><?php echo ((is_array($_tmp=$this->_tpl_vars['postedjobArray'][$this->_sections['i']['index']]['job_desc'])) ? $this->_run_mod_handler('substr', true, $_tmp, 0, 25) : substr($_tmp, 0, 25));  if (((is_array($_tmp=$this->_tpl_vars['postedjobArray'][$this->_sections['i']['index']]['job_desc'])) ? $this->_run_mod_handler('strlen', true, $_tmp) : strlen($_tmp)) > '25'): ?>...<?php endif; ?></td>
                <td><?php echo ((is_array($_tmp=$this->_tpl_vars['postedjobArray'][$this->_sections['i']['index']]['date_added'])) ? $this->_run_mod_handler('date_format', true, $_tmp) : smarty_modifier_date_format($_tmp)); ?>
</td>
                <td>
                    <span><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/icon-search.png" onclick="javascript: window.location='<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=postjobdetail&userid=<?php echo ((is_array($_tmp=$this->_tpl_vars['postedjobArray'][$this->_sections['i']['index']]['user_id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
&id=<?php echo ((is_array($_tmp=$this->_tpl_vars['postedjobArray'][$this->_sections['i']['index']]['postjob_id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
';" style="cursor:pointer;" /></span>
                </td>
              </tr>
              <?php endfor; else: ?>
               <tr>
               	 <td colspan="6"><div class="error" align="center">Oops, Sorry there are no jobs.</div></td>
               </tr>
               <?php endif; ?>
            </table>
            </div>
              </ul>
            </li>
            <?php endif; ?>
            
            <?php if ($this->_tpl_vars['mod_per'][17] == '1'): ?>
            <li> <a href="#" class="active">Recently Inquiry</a>
              <ul>
              
            <div class="table_view">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_viewbox">
              <tr>
                <th align="center">#</th>
                <th width="20%">Name</th>
                <th width="15%">Status</th>
                <th width="25%" >Admin Reply</th>
                <th width="20%">Email</th>
                <th width="20%">Action</th>
              </tr>
              <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['contactArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?> 
              <tr>
                <td align="center"><?php echo $this->_sections['i']['iteration']; ?>
</td>
               <!-- <td><?php echo $this->_tpl_vars['userArray'][$this->_sections['i']['index']]['first_name']; ?>
&nbsp;<?php echo $this->_tpl_vars['userArray'][$this->_sections['i']['index']]['last_name']; ?>
</td>-->
                <?php if ($this->_tpl_vars['contactArray'][$this->_sections['i']['index']]['status'] == unanswered): ?>
                <td>
               <strong><?php echo $this->_tpl_vars['contactArray'][$this->_sections['i']['index']]['name']; ?>
</strong>
                </td>
                <?php else: ?>
                 <td>
				<?php echo $this->_tpl_vars['contactArray'][$this->_sections['i']['index']]['name']; ?>

                </td>
                <?php endif; ?>
	            <td><?php echo $this->_tpl_vars['contactArray'][$this->_sections['i']['index']]['readflag']; ?>
</td>
                <td><?php echo $this->_tpl_vars['contactArray'][$this->_sections['i']['index']]['status']; ?>
</td>
                <td><?php echo $this->_tpl_vars['contactArray'][$this->_sections['i']['index']]['email_id']; ?>
</td>

                <td>
                  <span><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/icon-search.png" onclick="javascript: window.location='<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=detail_contact&id=<?php echo ((is_array($_tmp=$this->_tpl_vars['contactArray'][$this->_sections['i']['index']]['id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
&page=<?php echo $this->_tpl_vars['page']; ?>
';" style="cursor:pointer;" /></span>
                </td>
              </tr>
              <?php endfor; else: ?>
               <tr>
               	 <td colspan="6"><div class="error" align="center">Oops, Sorry there are no inquiry.</div></td>
               </tr>
               <?php endif; ?>
            </table>
            </div>
              </ul>
            </li>
            <?php endif; ?>
            
            <?php if ($this->_tpl_vars['mod_per'][24] == '1'): ?>
            <li> <a href="#" class="active">Recently Messages</a>
              <ul>
              
            <div class="table_view">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_viewbox">
              <tr>
                <th align="center">#</th>
                <th width="20%">From Name</th>
                <th width="20%">To Name</th>
                <th width="25%" >Subject</th>
                <th width="20%">Date</th>
                <th width="15%">Action</th>
              </tr>
              <?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['msgArray']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?> 
              <tr>
                <td align="center"><?php echo $this->_sections['i']['iteration']; ?>
</td>
                <td><?php echo ((is_array($_tmp=$this->_tpl_vars['msgArray'][$this->_sections['i']['index']]['from_name'])) ? $this->_run_mod_handler('ucwords', true, $_tmp) : ucwords($_tmp)); ?>
</td>
                <td><?php echo ((is_array($_tmp=$this->_tpl_vars['msgArray'][$this->_sections['i']['index']]['to_name'])) ? $this->_run_mod_handler('ucwords', true, $_tmp) : ucwords($_tmp)); ?>
</td>
                <td><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['msgArray'][$this->_sections['i']['index']]['subject'])) ? $this->_run_mod_handler('ucwords', true, $_tmp) : ucwords($_tmp)))) ? $this->_run_mod_handler('truncate', true, $_tmp, 25, "...") : smarty_modifier_truncate($_tmp, 25, "...")); ?>
</td>
                <td><?php echo $this->_tpl_vars['msgArray'][$this->_sections['i']['index']]['send_date']; ?>
</td>                

                <td>
                  <span><img src="<?php echo $this->_tpl_vars['siteroot']; ?>
/templates/admin/img/icon-search.png" onclick="javascript: window.location='<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=detail_msg&id=<?php echo ((is_array($_tmp=$this->_tpl_vars['msgArray'][$this->_sections['i']['index']]['id'])) ? $this->_run_mod_handler('base64_encode', true, $_tmp) : smarty_modifier_base64_encode($_tmp)); ?>
&page=<?php echo $this->_tpl_vars['page']; ?>
';" style="cursor:pointer;" /></span>
                </td>
              </tr>
              <?php endfor; else: ?>
               <tr>
               	 <td colspan="6"><div class="error" align="center">Oops, Sorry there are no messages.</div></td>
               </tr>
               <?php endif; ?>
            </table>
            </div>
              </ul>
            </li>
            <?php endif; ?>
              
          </ul>
          
        </div>
        
          
          </div>
          <div class="clear"></div>         
          
        </div>
      </div>
      
      
      <!--right_contain end-->
      <div class="clear"></div>
    </div>
    
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['footer'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>